package org.example.api;

import org.example.api.model.dto.ActivityDTO;
import org.example.api.model.dto.ActivityStrategyPrizeDTO;
import org.example.api.model.dto.LotteryRecordDTO;
import org.example.api.model.dto.PrizeDTO;
import org.example.api.model.response.Response;
import org.springframework.web.bind.annotation.RequestParam;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author lxc18
 * @date 2025/3/24 10:59
 * @description IUserPaticipateApiService
 */
public interface IActivityManageApiService {
//    boolean createActivity(ActivityEntity activityEntity);
    Response<Boolean> createActivity(String activityName, LocalDateTime startTime, LocalDateTime endTime);
//    boolean updateActivity(ActivityEntity activityEntity);
//
    Response<Boolean> updateActivity(Long activityId, String activityName, LocalDateTime startTime, LocalDateTime endTime);
//    boolean deleteActivity(Long activityId);
//
    Response<Boolean> deleteActivity(Long activityId);
//
//    //    支持模糊查询（根据名字）
//    List<ActivityEntity> queryActivityByName(String activityName);
//
    Response<List<ActivityDTO>> queryActivityByName(String activityName);
//    //根据id查询活动
//    ActivityEntity queryActivityById(Long activityId);
//
    Response<ActivityDTO> queryActivityById(Long activityId);
//    //    支持分页查询
//    List<ActivityEntity> queryActivityByPage(int pageNum, int pageSize);
    Response<List<ActivityDTO>> queryActivityByPage(int pageNum, int pageSize);


//    boolean createPrize(PrizeEntity prizeEntity);
    Response<Boolean> createPrize(
                                  String prizeName,
                                  String prizeDescription,
                                  String prizeType,
                                  int stockAvailable,
                                  double probability);
//    boolean deletePrize(Long prizeId);
    Response<Boolean> deletePrize(Long prizeId);
//    boolean updatePrize(PrizeEntity prizeEntity);
    Response<Boolean> updatePrize( Long prizeId,
                                  String prizeName,
                                  String prizeDescription,
                                  String prizeType,
                                  double probability);
//    List<PrizeEntity> queryPrizeByName(String prizeName);
    Response<List<PrizeDTO>> queryPrizeByName(String prizeName);
//    //    根据id查询奖品
//    PrizeEntity queryPrizeById(Long prizeId);
    Response<PrizeDTO> queryPrizeById(Long prizeId);
//    List<PrizeEntity> queryPrizeByPage(int pageNum, int pageSize);
    Response<List<PrizeDTO>> queryPrizeByPage(int pageNum, int pageSize);
//    //    修改指定奖品库存
//    boolean updatePrizeStock(Long prizeId, int stock);
    Response<Boolean> addPrizeStock(Long prizeId, int stock);



//    //修改策略配置
//    boolean updateStrategy(ActivityStrategyPrizeEntity activityStrategyPrize);
    Response<Boolean> updateStrategy(Long activityId,
                                           String strategyName,
                                           String prizeIds,
                                           String config);

//    //查询策略配置
//    ActivityStrategyPrizeEntity queryStrategy(Long activityId,String strategyName);
    Response<ActivityStrategyPrizeDTO> queryStrategy(Long activityId, String strategyName);
//
//    List<ActivityStrategyPrizeEntity> queryStrategyByActivityId(Long activityId);
    Response<List<ActivityStrategyPrizeDTO>> queryStrategyByActivityId(Long activityId);

    //活动预热
    Response<Boolean> preload(Long activityId);

}
